<{extend name="public/layout"}>

<{block name="h1"}>客服管理<{/block}>

<{block name="breadcrumb"}>
<li class="active">客服管理</li>
<{/block}>

<{block name="content"}>
<div class="row">
    <div class="col-xs-12">
        <div class="box">
            <div class="box-header"><a href="<{:url('add')}>" class="btn btn-primary"><i class="fa fa-plus"></i> 添加</a></div>
            <div class="box-body">
                <table id="example2" class="table table-bordered table-hover">
                    <thead>
                    <tr>
                        <th>编号</th>
                        <th>名称</th>
                        <th>头像</th>
                        <th>所属分组</th>
                        <th>账号状态</th>
                        <th>在线状态</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <{volist name="rows" id="row"}>
                    <tr>
                        <td><{$row.uid}></td>
                        <td><{$row.username}></td>
                        <td><img class="avatar" src="<{$row.avatar}>" alt="<{$row.nickname}>"></td>
                        <td><{$row.title}></td>
                        <td>
                          <{$row.status == 'normal' ? '<label class="label bg-primary">正常</label>' : '<label class="label bg-black">禁用</label>'}>
                        </td>
                        <td>
                          <{$row.state == 'online' ? '<label class="label bg-primary">在线</label>' : '<label class="label bg-black">离线</label>'}>
                        </td>
                        <td>
                            <a href="<{:url('edit', ['uid' => $row['uid']])}>" class="btn btn-xs btn-default">编辑</a>
                            <a href="javascript:void(0);" data-url="<{:url('delete', ['uid' => $row['uid']])}>" class="btn btn-xs btn-danger btn-delete">删除</a>
                        </td>
                    </tr>
                    <{/volist}>
                    </tfoot>
                </table>
            </div>
        </div>
    </div>
</div>
<{/block}>
<{block name="js"}>
<{js href="/static/admin/js/johnxu.js"}>
<script type="text/javascript">
    $(function() {
        $('#example2').DataTable()
    })
</script>
<{/block}>